package com.universal.frame.views;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;

/**
 * Copyright © 2015 蓝色互动. All rights reserved.
 *
 * @author wujm
 * @Description 自定义ListView，解决ScrollView嵌套ListView，listivew显示不完整的问题
 * @date 2015-3-16 下午3:23:20
 */
public class WrapListView extends ListView {

    public WrapListView(Context context) {
        super(context);
    }

    public WrapListView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public WrapListView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}
